<script>
import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup.vue"
import store from "../../store"
import { dictActionType } from "../../store/modules/dict"
import { getShowNginxPicUrl } from "@/utils/settings"

export default {
  name: "index",
  components: { UniPopup },
  data() {
    return {
      backgroundImageUrl: "",
      getShowNginxPicUrl,
    }
  },
  async created() {
    const backgroundImageUrl = getShowNginxPicUrl("8RK7hTr7UDCErouWPYpm.png")
    this.backgroundImageUrl = `url("${backgroundImageUrl}") no-repeat`
  },
  methods: {
    open() {
      this.$refs.popup.open()
    },
  },
}
</script>

<template>
  <uni-popup ref="popup" type="center">
    <view class="content" :style="{ background: backgroundImageUrl, 'background-size': '100% auto' }">
      <view class="msg" style="margin-top: 220rpx">长按识别以下二维码联系客服</view>
      <view class="msg">联系客服</view>
      <image class="qr-code" :src="getShowNginxPicUrl('20240312162101.jpg')" :show-menu-by-longpress="true"></image>
      <image class="close-btn" src="/static/close_fill.png" @click="() => $refs.popup.close()"></image>
    </view>
  </uni-popup>
</template>

<style scoped lang="scss">
.content {
  border-radius: 20rpx 20rpx 20rpx 20rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 560rpx;
  height: 700rpx;
  position: relative;
  .msg {
    line-height: 1.7;
    color: var(--text-color-light);
    font-size: 32rpx;
  }
  .qr-code {
    width: 250rpx;
    height: 250rpx;
    margin-top: 40rpx;
  }
  .close-btn {
    position: absolute;
    bottom: -100rpx;
    width: 100rpx;
    height: 100rpx;
    left: 50%;
    transform: translateX(-50%);
  }
}
</style>
